freebsd_instance:
  image_family: freebsd-12-1

env:
  CI_REPOSITORY_URL: {{ CI_REPOSITORY_URL }}
  CI_COMMIT_REF_NAME: {{ CI_COMMIT_REF_NAME }}
  CI_COMMIT_SHA: {{ CI_COMMIT_SHA }}

freebsd_12_task:
  install_script:
    - pkg install -y
          augeas
          autoconf
          automake
          avahi
          bash
          bash-completion
          ca_root_nss
          ccache
          chrony
          cppi
          curl
          cyrus-sasl
          dbus
          diskscrub
          dnsmasq
          fusefs-libs
          gdb
          gettext
          gettext-tools
          git
          glib
          gmake
          gnutls
          hal
          libpcap
          libpciaccess
          libssh
          libssh2
          libtool
          libxml2
          libxslt
          lsof
          meson
          ncurses
          ninja
          patch
          perl5
          pkgconf
          polkit
          py37-docutils
          py37-flake8
          py37-setuptools
          py37-wheel
          python3
          qemu-utils
          radvd
          readline
          screen
          sudo
          vim
          yajl
  clone_script:
    - git clone --depth 100 "$CI_REPOSITORY_URL" .
    - git fetch origin "$CI_COMMIT_REF_NAME"
    - git reset --hard "$CI_COMMIT_SHA"
  build_script:
    - mkdir build
    - cd build
    - ../autogen.sh --prefix=$(pwd)/install-root
    - gmake -j3
    - gmake -j3 install
    - gmake -j3 dist
